<div class="app-nav">
  <div class="nav-content">
    <a class="logo" href="/news" title="HwH的小站"><img src="/dist/img/logo@2.png" alt="HwH的小站的小站"></a>
    <input id="menu-btn" type="checkbox">
    <label for="menu-btn" class="menu-btn-wrapper">
      <span></span>
      <span></span>
      <span></span>
    </label>
    <ul class="nav_menu">
      <li><a class="nav_menu_item <%- articleType == 'posts' ? 'active' : '' %>" href="/posts">首页</a></li>
      <li><a class="nav_menu_item <%- articleType == 'news' ? 'active' : '' %>" href="/news">IT资讯</a></li>
      <li><a class="nav_menu_item <%- articleType == 'articles' ? 'active' : '' %>" href="/articles">博文</a></li>
      <li><a class="nav_menu_item <%- articleType == 'movies' ? 'active' : '' %>" href="/movies">电影</a></li>
      <li><a class="nav_menu_item" href="/app/utao.apk?v10">app</a></li>
    </ul>
    <div class="nav-_form-wrapper">
      <form method="get" action="/search" target="_blank">
        <input type="text" class="nav_form_input" name="keyword" placeholder="标题/内容/标签">
        <button type="submit" class="nav_form_submit icon icon-search"></button>
      </form>
    </div>
    <div class="login-wrapper">
      <% if (!user) { %>
        <% if(originalUrl) {%>
      <a href="/signin?from=<%= originalUrl %>" class="signin">登录</a>
      <a href="/signup?from=<%= originalUrl %>" class="signup">注册</a>
        <%} else {%>
      <a href="/signin" class="signin">登录</a>
      <a href="/signup" class="signup">注册</a>
        <% } %>
      <% } else {%>
      <a href="/posts/create" class="post icon icon-pencil-1"></a>
      <div class="app-selector">
        <div class="selector_text">
          <a href="javascript:;" class="user_avatar" title="<%= user.name %>">
          <% if (user.avatar) { %>
          <img src="<%= user.avatar %>">
          <%} else { %>
            <span class="icon icon-user"></span>
          <%}%>
          </a>
        </div>
        <div class="selector_menu">
          <a href="/admin" class="selector_option"><span class="icon icon-cog"></span>后台管理</a>
          <a href="/signout" class="selector_option"><span class="icon icon-logout"></span>退出</a>
        </div>
      </div>
      <% } %>
    </div>
  </div>
</div>